map("state", "washington", fill=T, col="palegreen3", border="grey50", ylim=c(49.2, 47.0), xlim=c(-122.0,-124.0)) map("state", "washington", fill=T, col="palegreen3", border="grey50") map("state", "washington", fill=T, col="palegreen3") points(x,y, col=loc.colors) text(x.txt,y,c("Drayton Harbor", "Big Beef Creek", "Lynch Cove", "North Bay", "Elliott Bay", "Sinclair Inlet", "Solo Point", "Hylebos Waterway"), cex=0.4, bold) map("state", "washington", fill=T, col="palegreen3") points(x,y, col=loc.colors, fill=T) text(x.txt,y,c("Drayton Harbor", "Big Beef Creek", "Lynch Cove", "North Bay", "Elliott Bay", "Sinclair Inlet", "Solo Point", "Hylebos Waterway"), cex=0.4) ?map map("state", "washington", fill=T, col="palegreen3", boundary=F) y.txt<-c(48.7, 47.597041, 47.436205, 48.706982, 47.599821, 47.542182, 47.138708, 47.276488) o points(x,y, col=loc.colors) text(x.txt,y.txt,c("Drayton Harbor", "Big Beef Creek", "Lynch Cove", "North Bay", "Elliott Bay", "Sinclair Inlet", "Solo Point", "Hylebos Waterway"), cex=0.4) y.txt<-c(48.9, 47.597041, 47.436205, 48.706982, 47.599821, 47.542182, 47.138708, 47.276488) map("state", "washington", fill=T, col="palegreen3", boundary=F) points(x,y, col=loc.colors) text(x.txt,y.txt,c("Drayton Harbor", "Big Beef Creek", "Lynch Cove", "North Bay", "Elliott Bay", "Sinclair Inlet", "Solo Point", "Hylebos Waterway"), cex=0.4) legend(-123.430741, 48.118146, legend=leg.txt, fill=c("blue3", "gold1", "orange2", "red3"), cex=0.25) library("maps") library("mapdata") library("mapproj") library("Rgooglemaps") library("Rgooglemap") library("RgoogleMaps") map("state", "washington", fill=T, col="palegreen3", boundary=F, fill=terrain.colors) map("state", "washington", fill=T, boundary=F, fill=terrain.colors) map("state", "washington", fill=terrain.colors, boundary=F) map("state", "washington", fill="terrain.colors", boundary=F) ?map map("state", "washington", fill=T,col=terrain.colors, boundary=F) map("state", "washington", fill=T,col="terrain.colors", boundary=F) library("GEOmaps") library("GEOmap") library("geomapdata") library("RPMG") library("akima") library("splancs") library("sp") library("splancs") ?GEOmap x<-c(-122.753796, -122.827754, -122.852089, -123.052859, -122.361794, -122.65349, -122.63235, -122.38929) y<-c(48.976076, 47.597041, 47.436205, 48.706982, 47.599821, 47.542182, 47.138708, 47.276488) BASICTOPOMAP(x,y,DOIMG=T, DOCONT=F) ?basictopomap library("maps") library("mapdata") library("mapproj") ?map map("county", regions=c("king", "whatcom")) map("state", "washington", regions=c("whatcom", "king")) map("county", "washington") map("usa", "washington", fill=T, boundary=F, col="palegreen3") map("state", "washington", fill=T, boundary=F, col="palegreen3") map("state", "washington", fill=T, boundary=F, col="palegreen3", border=F) map("state", "washington", fill=T, boundary=F, col="palegreen3", border=F, interior=F) map("state", "washington", fill=T, boundary=F, col="palegreen3", border=F, interior=F, resolution=0) map("state", "washington", fill=T, boundary=F, col="palegreen3", border=F, add=T, col="white") text(-122.4, 48.9, expression(bold("Drayton Harbor"))) text(-122.4, 48.9, expression(bold("Drayton Harbor"), cex=0.5)) ?text map("state", "washington", fill=T, boundary=F, col="palegreen3", border=F, add=T, col="white") map("state", "washington", fill=T, boundary=F, col="palegreen3", border=F) text(-122.4, 48.9, expression(bold("Drayton Harbor")), cex=0.5) map("state", "washington", fill=T, boundary=F, col="palegreen3", border=F) text(-122.4, 48.9, expression(bold("Drayton Harbor")), cex=0.5, offset=1) text(-122.4, 48.9, expression(bold("Drayton Harbor")), cex=0.5, offset=2) map("state", "washington", fill=T, boundary=F, col="palegreen3", border=F) text(-122.4, 48.9, expression(bold("Drayton Harbor")), cex=0.5, offset=2) text(-123.2, 47.597041, expression(bold("Big Beef Creek")), cex=0.5) text(-122.1, 47.599821, expression(bold("Elliot Bay")), cex=0.5) text(-122.9, 47.542182, expression(bold("Sinclair Inlet")), cex=0.5) text(-122.3, 47.138708, expression(bold("Solo Point")), cex=0.5) text(-121.9, 47.276488, expression(bold("Hylebos Waterway")), cex=0.5) points(x,y) x1<-c(-122.753796, -122.827754, -122.361794, -122.65349, -122.63235, -122.38929) y1<-c(48.976076, 47.597041, 47.599821, 47.542182, 47.138708, 47.276488) points(x,y) map("state", "washington", fill=T, boundary=F, col="palegreen3", border=F) points(x1,y1) points(x1,y1, cex=3) ?points map("state", "washington", fill=T, boundary=F, col="palegreen3", border=F) points(x1,y1, bg="black") ?points points(x1,y1, pch=21:25, bg="black") map("state", "washington", fill=T, boundary=F, col="palegreen3", border=F) points(x1,y1, pch=21, bg="black") text(-123.2, 47.597041, expression(bold("Big Beef Creek")), cex=0.5)# text(-122.1, 47.599821, expression(bold("Elliot Bay")), cex=0.5)# text(-122.9, 47.542182, expression(bold("Sinclair Inlet")), cex=0.5)# text(-122.3, 47.138708, expression(bold("Solo Point")), cex=0.5)# text(-121.9, 47.276488, expression(bold("Hylebos Waterway")), cex=0.5) text(-122.4, 48.9, expression(bold("Drayton Harbor")), cex=0.5, offset=2) map("state", "washington", fill=T, boundary=F, col="palegreen3", border=F) points(x1,y1, pch=21, bg="firebrickred") points(x1,y1, pch=21, bg="firebrickred3") points(x1,y1, pch=21, bg="red") text(-122.4, 48.9, expression(bold("Drayton Harbor")), cex=0.5, offset=2)# text(-123.2, 47.597041, expression(bold("Big Beef Creek")), cex=0.5)# text(-122.1, 47.599821, expression(bold("Elliot Bay")), cex=0.5)# text(-122.9, 47.542182, expression(bold("Sinclair Inlet")), cex=0.5)# text(-122.3, 47.138708, expression(bold("Solo Point")), cex=0.5)# text(-121.9, 47.276488, expression(bold("Hylebos Waterway")), cex=0.5) library("maps") library("mapdata") library("mapproj") map("state", "washington", fill=T, col="palegreen3", boundary=F) x<-c(-122.753796, -122.827754, -122.852089, -123.052859, -122.361794, -122.65349, -122.63235, -122.38929) map("state", "washington", fill=T, boundary=F, col="palegreen3", border=F) x1<-c(-122.753796, -122.827754, -122.361794, -122.65349, -122.63235, -122.38929)# y1<-c(48.976076, 47.597041, 47.599821, 47.542182, 47.138708, 47.276488) points(x1,y1, pch=21, bg="red") text(-122.4, 48.9, expression(bold("Drayton Harbor")), cex=0.5, offset=2)# text(-123.2, 47.597041, expression(bold("Big Beef Creek")), cex=0.5)# text(-122.1, 47.599821, expression(bold("Elliot Bay")), cex=0.5)# text(-122.9, 47.542182, expression(bold("Sinclair Inlet")), cex=0.5)# text(-122.3, 47.138708, expression(bold("Solo Point")), cex=0.5)# text(-121.9, 47.276488, expression(bold("Hylebos Waterway")), cex=0.5) ?merge library(affy) ?edge library(edgeR) ?edgeR edgeR edge ?edge ?seacarb ?pgas library(seacarb) ?seacarb ?pgas setwd("/Users/emmatimminsschiffman/Documents/Dissertation/Summer 2010")# development<-read.csv("OADev1.csv", sep=",", header=T)# raw.dev<-read.csv("OADev counts.csv", sep=",", header=T) T1380<-development$Percent[1]# T1840<-development$Percent[2]# T2380<-development$Percent[3]# T2840<-development$Percent[4]# T3380<-development$Percent[5]# T3840<-development$Percent[6]# T4380<-development$Percent[7]# T4840<-development$Percent[8]# T5380<-development$Percent[9]# T5840<-development$Percent[10] error.bar<-function(x,y,upper, lower=upper, length=0.1)# {if(length(x) !=length(y)|length(y) !=length(lower)|length(lower) !=length(upper))# stop("vectors must be same length")# arrows(x,y+upper, x, y-lower, angle=90, code=3, length=length)# } cleav.mat<-matrix(data=c(T1380, T2380,T1840, T2840), ncol=2, nrow=2, byrow=T) plot.cleav<-c(T1380, T2380,T1840, T2840) bar.clv<-barplot(plot.cleav,beside=T, space=c(0,1),col=c("slateblue3", "steelblue3"), xlab="Time Post Fertilization", ylab="Proportion Cleavage", names.arg=c(rep("1 hr,2-cell",2), rep("2 hrs,>4-cell",2)), cex.names=1.2, cex.lab=1.5,ylim=c(0,.6)) plot.cleav<-c(T1380, T2380,T1840, T2840) bar.clv<-barplot(plot.cleav,beside=T, space=c(0,1),col=c("slateblue3", "steelblue3"), xlab="Time Post Fertilization", ylab="Proportion Cleavage", names.arg=c(rep("1 hr,2-cell",2), rep("2 hrs,>4-cell",2)), cex.names=1.2, cex.lab=1.5,ylim=c(0,.6)) T1380<-development$Percent[1] development<-read.csv("OADev1.csv", sep=",", header=T) setwd("/Users/emmatimminsschiffman/Documents/Dissertation/Summer 2010") getwd() setwd("/Users/emmatimminsschiffman/Documents/Dissertation/Summer 2010") getwd() setwd("/Users/emmatimminsschiffman/Documents/Dissertation/Summer 2010") development<-read.csv("OADev1.csv", sep=",", header=T) raw.dev<-read.csv("OADev counts.csv", sep=",", header=T) T1380<-development$Percent[1]# T1840<-development$Percent[2]# T2380<-development$Percent[3]# T2840<-development$Percent[4]# T3380<-development$Percent[5]# T3840<-development$Percent[6]# T4380<-development$Percent[7]# T4840<-development$Percent[8]# T5380<-development$Percent[9]# T5840<-development$Percent[10] error.bar<-function(x,y,upper, lower=upper, length=0.1)# {if(length(x) !=length(y)|length(y) !=length(lower)|length(lower) !=length(upper))# stop("vectors must be same length")# arrows(x,y+upper, x, y-lower, angle=90, code=3, length=length)# } cleav.mat<-matrix(data=c(T1380, T2380,T1840, T2840), ncol=2, nrow=2, byrow=T) plot.cleav<-c(T1380, T2380,T1840, T2840) bar.clv<-barplot(plot.cleav,beside=T, space=c(0,1),col=c("slateblue3", "steelblue3"), xlab="Time Post Fertilization", ylab="Proportion Cleavage", names.arg=c(rep("1 hr,2-cell",2), rep("2 hrs,>4-cell",2)), cex.names=1.2, cex.lab=1.5,ylim=c(0,.6)) T1380 T1840 T2380 bar.clv<-barplot(cleav.mat,beside=T, space=c(0,1),col=c("slateblue3", "steelblue3"), xlab="Time Post Fertilization", ylab="Proportion Cleavage", names.arg=c(rep("1 hr,2-cell",2), rep("2 hrs,>4-cell",2)), cex.names=1.2, cex.lab=1.5,ylim=c(0,.6)) bar.clv<-barplot(cleav.mat,beside=T, space=c(0,1),col=c("slateblue3", "steelblue3"), xlab="Time Post Fertilization", ylab="Proportion Cleavage", names.arg=c(rep("1 hr,2-cell",2), rep("2 hrs,>4-cell",2)), cex.names=1.15, cex.lab=1.5,ylim=c(0,.6)) bar.clv<-barplot(cleav.mat,beside=T, space=c(0,1),col=c("slateblue3", "steelblue3"), xlab="Time Post Fertilization", ylab="Proportion Cleavage", names.arg=c(rep("1 hr,2-cell",2), rep("2 hrs,>4-cell",2)), cex.names=1.1, cex.lab=1.5,ylim=c(0,.6)) bar.clv<-barplot(cleav.mat,beside=T, space=c(0,1),col=c("slateblue3", "steelblue3"), xlab="Time Post Fertilization", ylab="Proportion Cleavage", names.arg=c(rep("1 hr,2-cell",2), rep("2 hrs,>4-cell",2)), cex.names=1.05, cex.lab=1.5,ylim=c(0,.6)) bar.clv<-barplot(cleav.mat,beside=T, space=c(0,1),col=c("slateblue3", "steelblue3"), xlab="Time Post Fertilization", ylab="Proportion Cleavage", names.arg=c(rep("1 hr,2-cell",2), rep("2 hrs,>4-cell",2)), cex.lab=1.5,ylim=c(0,.6)) setwd("/Users/emmatimminsschiffman/Documents/Dissertation/Summer 2010") raw.dev<-read.csv("OADev counts.csv", sep=",", header=T) y.err.cleav<-c(sd(raw.dev$development[1:3]),sd(raw.dev$development[4:6]),sd(raw.dev$development[7:9]),sd(raw.dev$development[10:12]) ) error.bar(bar.clv,plot.cleav,y.err.cleav) error.bar(bar.clv,cleav.mat,y.err.cleav) bar.clv<-barplot(cleav.mat,beside=T, space=c(0,1),col=c("slateblue3", "steelblue3"), xlab="Time Post Fertilization", ylab="Proportion Cleavage", names.arg=c(rep("1 hr,2-cell",2), rep("2 hrs,>4-cell",2)), cex.lab=1.5,ylim=c(0,.6)) error.bar(bar.clv,cleav.mat,y.err.cleav) bar.clv<-barplot(cleav.mat,beside=T, space=c(0,1),col=c("slateblue3", "steelblue3"), xlab="Time Post Fertilization", ylab="Proportion Cleavage", names.arg=c(rep("1 hr,2-cell",2), rep("2 hrs,>4-cell",2)), cex.lab=1.5,ylim=c(0,.62)) error.bar(bar.clv,cleav.mat,y.err.cleav) bar.clv<-barplot(cleav.mat,beside=T, space=c(0,1),col=c("slateblue3", "steelblue3"), xlab="Time Post Fertilization", ylab="Proportion Cleavage", names.arg=c(rep("1 hr,2-cell",2), rep("2 hrs,>4-cell",2)), cex.lab=1.5,ylim=c(0,.65)) error.bar(bar.clv,cleav.mat,y.err.cleav) hatch.dat<-c(T3380, T3840, T4380,T4840, T5380,T5840) bar.hatch<-barplot(hatch.dat, beside=T,space=c(0.1,0.5), width=0.5, col=c("slateblue3", "steelblue3"), xlab="Time Post Fertilization (Hours)", ylab="Proportion Hatched", names.arg=c("5", "5", "17", "17", "24","24"), cex.names=1.5,cex.lab=1.5,ylim=c(0,1.1)) T3380 T3840 T4380 T4840 bar.hatch<-barplot(hatch.dat, beside=T,space=c(0,0,1,0,1,0,1), width=0.5, col=c("slateblue3", "steelblue3"), xlab="Time Post Fertilization (Hours)", ylab="Proportion Hatched", names.arg=c("5", "5", "17", "17", "24","24"), cex.names=1.5,cex.lab=1.5,ylim=c(0,1.1)) bar.hatch<-barplot(hatch.dat, beside=T,space=c(0,0,1,0,1,0), width=0.5, col=c("slateblue3", "steelblue3"), xlab="Time Post Fertilization (Hours)", ylab="Proportion Hatched", names.arg=c("5", "5", "17", "17", "24","24"), cex.names=1.5,cex.lab=1.5,ylim=c(0,1.1)) y.err.hatch<-c(sd(raw.dev$development[13:15]),sd(raw.dev$development[6:18]),sd(raw.dev$development[19:21]),sd(raw.dev$development[22:24]),sd(raw.dev$development[25:27]),sd(raw.dev$development[28:30])) error.bar(bar.hatch,hatch.dat,y.err.hatch) setwd("/Users/emmatimminsschiffman/Documents/Dissertation/Summer 2010") development<-read.csv("OADev1.csv", sep=",", header=T) T1380<-development$Percent[1]# T1840<-development$Percent[2]# T2380<-development$Percent[3]# T2840<-development$Percent[4]# T3380<-development$Percent[5]# T3840<-development$Percent[6]# T4380<-development$Percent[7]# T4840<-development$Percent[8]# T5380<-development$Percent[9]# T5840<-development$Percent[10] cleav.mat<-matrix(data=c(T1380, T2380,T1840, T2840), ncol=2, nrow=2, byrow=T) bar.clv<-barplot(cleav.mat,beside=T, space=c(0,1),col=c("slateblue3", "steelblue3"), xlab="Time Post Fertilization", ylab="Proportion Cleavage", names.arg=c(rep("1 hr,2-cell",2), rep("2 hrs,>4-cell",2)), cex.lab=1.5,ylim=c(0,.65)) ?setwd library(seacarb) c(1,2,3,4,5) 1:5 help(package='seacarb') ?seacarb amp(s=35,T=25) amp(S=35,T=25) ?alkalinity alkalinity data(alkalinity) p2fCO2(T=16, 860) p2fCO2(T=16, pCO2=860) library(seacarb) p2fCO2 f2pCO2 bjerrum library(seacarb) p2fCO2 f2pCO2 amp buffer carb library(seacarb) p2fCO2(T=25, pCO2=380) p2fCO2 alkalinit alkalinity bjerrum amp p2fco2 p2fCO2 setwd('/Users/emmatimminsschiffman/Documents/Dissertation/Total alkalinity') animals.dat<-read.csv('TA.animals.csv', header=T, na.strings='na') head(animals.dat) barplot(animals.dat$TA) plot.clam<-c(animals.dat$TA[14:20], animals.dat$TA[1:13]) names<-c(rep('Control', 7), rep('High CO2', 7), rep('Low CO2', 6)) barplot(plot.clam, names.arg=names) barplot(plot.clam, names.arg=names, col=c(rep('black', 7), rep('white', 7), rep('gray28', 6))) animals.dat<-read.csv('TA.animals.csv', header=T, na.strings='na') barplot(plot.clam, col=c(rep('black', 7), rep('white', 7), rep('gray28', 6)), density=c(rep(1000,7), rep(5, 4), rep(-20, 3), rep(5,3), rep(-20, 3))) barplot(plot.clam, col=c(rep('white', 7), rep('black', 7), rep('gray28', 6)), density=c(rep(1,7), rep(5, 4), rep(-20, 3), rep(5,3), rep(-20, 3))) barplot(plot.clam, col=c(rep('white', 7), rep('black', 7), rep('gray28', 6)), density=c(rep(1,7), rep(10, 4), rep(-20, 3), rep(10,3), rep(-20, 3))) barplot(plot.clam, col=c(rep('white', 7), rep('black', 7), rep('gray28', 6)), density=c(rep(1,7), rep(10, 4), rep(-20, 3), rep(10,3), rep(-20, 3)), main='Total Alkalinity in Clam Jars', ylab='Total Alkalinity (µmol/kg seawater)') plot.oyster<-c(animals.dat$TA[14:34]) barplot(plot.oyster, col=c(rep('white', 7), rep('black', 6), rep('gray28', 8)), density=c(rep(1,7), rep(10, 3), rep(-20, 3), rep(10,3), rep(-20, 5)), main='Total Alkalinity in Oyster Jars', ylab='Total Alkalinity (µmol/kg seawater)') pH.dat<-read.csv('pH.animals.csv', header=T, na.strings='na') head(pH.dat) clam.pH<-c(pH.dat$pH[13:16], pH.dat$pH[1:12]) barplot(clam.pH, col=c(rep('black', 2), rep('gray28', 2), rep('black', 5), rep('gray28', 7))) barplot(clam.pH, col=c(rep('black', 2), rep('gray28', 2), rep('black', 5), rep('gray28', 7)), density=c(rep(-100, 4), rep(10, 3), rep(-20, 2), rep(10, 3), rep(-20, 4))) ?boxplot co2.group<-c(pH.dat$CO2[13:16], pH.dat$CO2[1:12]) boxplot(clam.pH~co2.group) boxplot(pH.dat$pH[1:12]~pH.dat$CO2[1:12]) boxplot(pH.dat$pH[1:12]~pH.dat$CO2[1:12], ylab='pH', main='pH in Clam Jars', xlab='pCO2 Treatment Group') barplot(animals.dat$TA[1:13], col=c(rep('black', 7), rep('gray28', 6)), density=c(rep(10, 4), rep(-20, 3), rep(10,3), rep(-20, 3)), main='Total Alkalinity in Clam Jars', ylab='Total Alkalinity (µmol/kg seawater)') abline(2055,0) abline(2055,0, lwd=3) barplot(animals.dat$TA[1:13], col=c(rep('black', 7), rep('gray28', 6)), density=c(rep(10, 4), rep(-20, 3), rep(10,3), rep(-20, 3)), main='Total Alkalinity in Clam Jars', ylab='Total Alkalinity (µmol/kg seawater)', ylim=c(0,2500)) abline(2055,0, lwd=3) barplot(animals.dat$TA[21:34], col=c(rep('black', 6), rep('gray28', 8)), density=c(rep(10, 3), rep(-20, 3), rep(10,3), rep(-20, 5)), main='Total Alkalinity in Oyster Jars', ylab='Total Alkalinity (µmol/kg seawater)') barplot(animals.dat$TA[21:34], col=c(rep('black', 6), rep('gray28', 8)), density=c(rep(10, 3), rep(-20, 3), rep(10,3), rep(-20, 5)), main='Total Alkalinity in Oyster Jars', ylab='Total Alkalinity (µmol/kg seawater)', ylim=c(0,2500)) abline(2055,0, lwd=3) boxplot(pH.dat$pH[1:12]~pH.dat$CO2[1:12], ylab='pH', main='pH in Clam Jars', xlab='pCO2 Treatment Group') boxplot(pH.dat$pH[21:34]~pH.dat$CO2[21:34], ylab='pH', main='pH in Oyster Jars', xlab='pCO2 Treatment Group') boxplot(pH.dat$pH[21:34]~pH.dat$CO2[21:34], ylab='pH', main='pH in Oyster Jars', xlab='pCO2 Treatment Group', ylim=c(6,8)) boxplot(pH.dat$pH[1:12]~pH.dat$CO2[1:12], ylab='pH', main='pH in Clam Jars', xlab='pCO2 Treatment Group', ylim=c96,8) boxplot(pH.dat$pH[1:12]~pH.dat$CO2[1:12], ylab='pH', main='pH in Clam Jars', xlab='pCO2 Treatment Group', ylim=c(6,8)) boxplot(pH.dat$pH[21:34]~pH.dat$CO2[21:34], ylab='pH', main='pH in Oyster Jars', xlab='pCO2 Treatment Group', ylim=c(6.5,8)) boxplot(pH.dat$pH[1:12]~pH.dat$CO2[1:12], ylab='pH', main='pH in Clam Jars', xlab='pCO2 Treatment Group', ylim=c(6.5,8)) boxplot(pH.dat$pH[21:34]~pH.dat$CO2[21:34], ylab='pH', main='pH in Oyster Jars', xlab='pCO2 Treatment Group', ylim=c(6.5,8)) clampH.lm<-lm(pH.dat$pH[1:12]~pH.dat$CO2[1:12]) anova(clampH.lm) oysterpH.lm<-lm(pH.dat$pH[21:34]~pH.dat$CO2[21:34]) anova(oysterpH.lm)